<?
require("config.php");

$location_status .= "| Enquire";
$show_backnav = "news_menu";
$menuname = NULL;
$menutarget = NULL;

if (NULL!=$action){

	$Query = "DELETE FROM $table WHERE id=$id";
	myQuery($Query);

   header("location:" . $rela_path . "share/msg.php?v=36");

   exit();

}else{

  if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");

	exit();
  
  }

}


$Query = "SELECT 
code,
date,
subject, 
details,
picture1,
picture2,
picture3,
status,
publish_date, type
FROM $table WHERE id=$id LIMIT 1";

$r=myQuery($Query);

$Code=$r[0][0];
$Date=$r[0][1];
$Subject=$r[0][2];
$Details=$r[0][3];
$Picture1=$r[0][4];
$Picture2=$r[0][5];
$Picture3=$r[0][6];
$Status=$r[0][7];
$Publish_date=$r[0][8];
$type=$r[0][9];

/*
if (!$Settime) {
	$Settime="No";
}else{
	$Settime="Yes";
}
*/

require($rela_path . "inc/header.php");

?>
<form action="" method="post" enctype="multipart/form-data" name="form1">
<input name="action" type="hidden" value="delete">
<input name="id" type="hidden" value="<?print($id)?>">




<table width="95%" border="0" align="center">
  <tr> 
      <td valign="top"> <p>
          <br>
        <table border="0" cellspacing="5" cellpadding="1">
          <tr> 
            <td class="tdheader">Code :</td>
            <td><?print($Code)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Date :</td>
            <td><?print(OutDate($Date))?></td>
          </tr>
					<tr> 
            <td class="tdheader">Type :</td>
            <td><?print($type)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Subject : </td>
            <td><?print($Subject)?></td>
          </tr>
          <tr>
            <td class="tdheader">Details :</td>
            <td><?print($Details)?></td>
          </tr>






          <tr> 
            <td class="tdheader">Picture 1</td>
            <td>
			
			
			<!--<br><b>(Normal Picture)</b><br>-->
			<?loadImage($Picture1,$rela_path . $PIC_DIR . "$table/")?> 

			<br><b>(Smaller Picture)</b><br>
			<?loadSmallImage($Picture1,$rela_path . $PIC_DIR . "$table/")?>
			<br><br>


            </td>
          </tr>



          <tr> 
            <td class="tdheader">Picture 2</td>
            <td>
			
			
			<!--<br><b>(Normal Picture)</b><br>-->
			<?loadImage($Picture2,$rela_path . $PIC_DIR . "$table/")?> 

			<br><b>(Smaller Picture)</b><br>
			<?loadSmallImage($Picture2,$rela_path . $PIC_DIR . "$table/")?>
			<br><br>


            </td>
          </tr>



          <tr> 
            <td class="tdheader">Picture 3</td>
            <td>
			
			
			<!--<br><b>(Normal Picture)</b><br>-->
			<?loadImage($Picture3,$rela_path . $PIC_DIR . "$table/")?> 

			<br><b>(Smaller Picture)</b><br>
			<?loadSmallImage($Picture3,$rela_path . $PIC_DIR . "$table/")?>
			<br><br>


            </td>
          </tr>







          <tr> 
            <td class="tdheader">Publish :</td>
            <td> <?echo $Status?>
			</td>
          </tr>
		  <tr> 
            <td class="tdheader">Publishing Date : </td>
            <td><?print(OutDate($Publish_date))?></td>
          </tr>


        </table>
        <p>
        <p> 
        <p> </td>

  </tr>
</table>
<br>
<br>
<br>


</form>
<?
require($rela_path . "inc/footer.php");
?>
